package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreRoleTelUsesPK implements Serializable {
    public Long roleId;
    public Long roleVersionNum;
    public Long telAddressId;
    public String useCode;

    public RimCoreRoleTelUsesPK() {
    }

    public RimCoreRoleTelUsesPK(Long roleId, Long roleVersionNum, 
                                Long telAddressId, String useCode) {
        this.roleId = roleId;
        this.roleVersionNum = roleVersionNum;
        this.telAddressId = telAddressId;
        this.useCode = useCode;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreRoleTelUsesPK) {
            final RimCoreRoleTelUsesPK otherRimCoreRoleTelUsesPK = (RimCoreRoleTelUsesPK) other;
            final boolean areEqual = 
                (otherRimCoreRoleTelUsesPK.roleId.equals(roleId) && otherRimCoreRoleTelUsesPK.roleVersionNum.equals(roleVersionNum) && otherRimCoreRoleTelUsesPK.telAddressId.equals(telAddressId) && otherRimCoreRoleTelUsesPK.useCode.equals(useCode));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
